Skip to main content

GradientPropertyRamp

Type​

operator

Summary​

The ramp of a gradient paint.

Syntax​

the ramp of <mGradient>

Description​

The ramp of mGradient. The ramp is a list of gradient stops that describes the color transitions along the length of the gradient

Parameters​

NameTypeDescription

mGradient

An expression which evaluates to a gradient.

Examples​

// Create new gradient paint
variable tGradient
put linear gradient with ramp [gradient stop at 0 with color [0,0,0], gradient stop at 1 with color [1,1,1]] into tGradient

// Get the gradient ramp
variable tRamp
put the ramp of tGradient into tRamp

// Change the color of the first stop
set the color of element 1 of tRamp to color [1,0,0]

// Set the new gradient ramp
set the ramp of tGradient to tRamp
Thank you for your feedback!

Was this page helpful?